﻿using System;

namespace Shared.Service.Authorizations.Authorization.DataScopes
{
    [Serializable]
   // [CacheName("DataScopeCache")]
    public class DataScopeCache
    {
        #region 构造函数


        public DataScopeCache()
        {

        }

        public DataScopeCache(string name, params DataScopeCacheItem[] items)
        {
            Name = name;
            Items = items;
        }

        #endregion

        /// <summary>
        /// 
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        public DataScopeCacheItem[] Items { get; set; }


        public static string CalculateCacheKey(string name, string providerName, string providerKey)
        {
            return "pn:" + providerName + ",pk:" + providerKey + ",n:" + name;
        }
    }
}
